package com.sinosoft.shopcar;

import java.util.Date;

import com.sinosoft.base.Constants;
import com.sinosoft.orderinfo.OrderInfo;

public class ShopToOrderUtil {
	
	public static OrderInfo switchOrderInfo(Shopinfo shop,String ftpurl)
	{
		OrderInfo order = new OrderInfo();
		order.setOperatorname(Constants.OPERATOR_NAME);
		order.setTasktype(shop.getTasktype());
		order.setTasktime(shop.getTasktime());
		order.setOperatorname(shop.getOperatorname());
		order.setUsertype(shop.getUsertype());
		order.setPriority(shop.getPriority());
		order.setUsername(shop.getUsername());
		order.setSatelliteid(shop.getSatelliteid());//卫星
		order.setSensorid(shop.getSensorid());//传感器		order.setProduct(shop.getProduct());
		order.setSceneid(shop.getSceneid());
		order.setProductid(shop.getProductid());
		order.setProductlevel(shop.getProductlevel());
		order.setOrdermediumid(shop.getOrdermediumid());
		order.setProductuploaddir(shop.getProductuploaddir());
		order.setPgproductformat(shop.getPgproductformat());
		order.setProducttype(shop.getProducttype());
		order.setScenecount(shop.getScenecount());
		order.setSceneshift(shop.getSceneshift());
		order.setOrbittype(shop.getOrbittype());
		order.setAtttype(shop.getAtttype());
		order.setBandnumber(shop.getBandnumber());
		order.setImagegsd(shop.getImagegsd());
		order.setMapprojection(shop.getMapprojection());
		order.setEarthellipsoid(shop.getEarthellipsoid());
		order.setResamplingkernel(shop.getResamplingkernel());
		order.setHeightmode(shop.getHeightmode());
		order.setEphemerisdata(shop.getEphemerisdata());
		order.setAttitudedata(shop.getAttitudedata());
		order.setRadiometricmethod(shop.getRadiometricmethod());
		order.setMtfcorrection(shop.getMtfcorrection());
		order.setReceivestationid(shop.getReceivestationid());
		order.setGsd(shop.getGsd());
		order.setDenoise(shop.getDenoise());
		order.setRayleighcorrection(shop.getRayleighcorrection());
		order.setOrderstate(shop.getOrderstate());
		order.setUpperleftlat(shop.getUpperleftlat());
		order.setUpperleftlong(shop.getUpperleftlong());
		order.setUpperrightlat(shop.getUpperrightlat());
		order.setUpperrightlong(shop.getUpperrightlong());
		order.setLowerleftlat(shop.getLowerleftlat());
		order.setLowerleftlong(shop.getLowerleftlong());
		order.setLowerrightlat(shop.getLowerrightlat());
		order.setLowerrightlong(shop.getLowerrightlong());
		order.setDelflag(shop.getDelflag());
		order.setAreadystate(shop.getAreadystate());
		order.setProductsize(shop.getProductsize());
		order.setCheckusername(shop.getCheckusername());
		order.setChecktime(shop.getChecktime());
		order.setNote(shop.getNote());
		order.setPrice(shop.getPrice());
		order.setClearform(shop.getClearform());
		order.setPixelspacing(shop.getPixelspacing());
		order.setOrthographmethod(shop.getOrthographmethod());
		order.setGeodeticmethod(shop.getGeodeticmethod());
		order.setEquationorder(shop.getEquationorder());
		order.setProductorientation(shop.getProductorientation());
		order.setEarthmodel(shop.getEarthmodel());
		order.setMtfcpromode(shop.getMtfcpromode());
		order.setDemtype(shop.getDemtype());
		order.setDatatype(shop.getDatatype());
		order.setCoordtype(shop.getCoordtype());
		order.setImagingalgor(shop.getImagingalgor());
		order.setFdcmethod(shop.getFdcmethod());
		order.setAzimuthlooks(shop.getAzimuthlooks());
		order.setRangelooks(shop.getRangelooks());
		order.setWeightrange(shop.getWeightrange());
		order.setDespecklemethod(shop.getDespecklemethod());
		order.setAntennapatternsource(shop.getAntennapatternsource());
		order.setAddwindow(shop.getAddwindow());
		order.setCorrectphase(shop.getCorrectphase());
		order.setReconstructprocss(shop.getReconstructprocss());
		order.setBandsordered(shop.getBandsordered());
		order.setWeightazimuth(shop.getWeightazimuth());
		order.setFdrmethod(shop.getFdrmethod());
		order.setStripid(shop.getStripid());
		order.setAutoprocessing(shop.getAutoprocessing());
		order.setBandregister(shop.getBandregister());
		order.setCcdbalance(shop.getCcdbalance());
		order.setDemsource(shop.getDemsource());
		order.setGcpsource(shop.getGcpsource());
		order.setProductuploaddir(ftpurl+shop.getProductuploaddir()); 
		return order;
	}
	
	public static Shopinfo switchShopcar(OrderInfo order)
	{
		Shopinfo shop = new Shopinfo();
		shop.setTasktype(order.getTasktype());
		shop.setTasktime(order.getTasktime());
		shop.setOperatorname(order.getOperatorname());
		shop.setUsertype(order.getUsertype());
		shop.setPriority(order.getPriority());
		shop.setUsername(order.getUsername());
		shop.setSatelliteid(order.getSatelliteid());
		shop.setSensorid(order.getSensorid());
		shop.setProduct(order.getProduct());
		shop.setSceneid(order.getSceneid());
		shop.setProductid(order.getProductid());
		shop.setProductlevel(order.getProductlevel());
		shop.setOrdermediumid(order.getOrdermediumid());
		shop.setProductuploaddir(order.getProductuploaddir());
		shop.setPgproductformat(order.getPgproductformat());
		shop.setProducttype(order.getProducttype());
		shop.setScenecount(order.getScenecount());
		shop.setSceneshift(order.getSceneshift());
		shop.setOrbittype(order.getOrbittype());
		shop.setAtttype(order.getAtttype());
		shop.setBandnumber(order.getBandnumber());
		shop.setImagegsd(order.getImagegsd());
		shop.setMapprojection(order.getMapprojection());
		shop.setEarthellipsoid(order.getEarthellipsoid());
		shop.setResamplingkernel(order.getResamplingkernel());
		shop.setHeightmode(order.getHeightmode());
		shop.setEphemerisdata(order.getEphemerisdata());
		shop.setAttitudedata(order.getAttitudedata());
		shop.setRadiometricmethod(order.getRadiometricmethod());
		shop.setMtfcorrection(order.getMtfcorrection());
		shop.setReceivestationid(order.getReceivestationid());
		shop.setGsd(order.getGsd());
		shop.setDenoise(order.getDenoise());
		shop.setRayleighcorrection(order.getRayleighcorrection());
		shop.setOrderstate(order.getOrderstate());
		shop.setUpperleftlat(order.getUpperleftlat());
		shop.setUpperleftlong(order.getUpperleftlong());
		shop.setUpperrightlat(order.getUpperrightlat());
		shop.setUpperrightlong(order.getUpperrightlong());
		shop.setLowerleftlat(order.getLowerleftlat());
		shop.setLowerleftlong(order.getLowerleftlong());
		shop.setLowerrightlat(order.getLowerrightlat());
		shop.setLowerrightlong(order.getLowerrightlong());
		shop.setDelflag(order.getDelflag());
		shop.setAreadystate(order.getAreadystate());
		shop.setProductsize(order.getProductsize());
		shop.setCheckusername(order.getCheckusername());
		shop.setChecktime(order.getChecktime());
		shop.setNote(order.getNote());
		shop.setPrice(order.getPrice());
		shop.setClearform(order.getClearform());
		shop.setPixelspacing(order.getPixelspacing());
		shop.setOrthographmethod(order.getOrthographmethod());
		shop.setGeodeticmethod(order.getGeodeticmethod());
		shop.setEquationorder(order.getEquationorder());
		shop.setProductorientation(order.getProductorientation());
		shop.setEarthmodel(order.getEarthmodel());
		shop.setMtfcpromode(order.getMtfcpromode());
		shop.setDemtype(order.getDemtype());
		shop.setDatatype(order.getDatatype());
		shop.setCoordtype(order.getCoordtype());
		shop.setImagingalgor(order.getImagingalgor());
		shop.setFdcmethod(order.getFdcmethod());
		shop.setAzimuthlooks(order.getAzimuthlooks());
		shop.setRangelooks(order.getRangelooks());
		shop.setWeightrange(order.getWeightrange());
		shop.setDespecklemethod(order.getDespecklemethod());
		shop.setAntennapatternsource(order.getAntennapatternsource());
		shop.setAddwindow(order.getAddwindow());
		shop.setCorrectphase(order.getCorrectphase());
		shop.setReconstructprocss(order.getReconstructprocss());
		shop.setBandsordered(order.getBandsordered());
		shop.setWeightazimuth(order.getWeightazimuth());
		shop.setFdrmethod(order.getFdrmethod());
		shop.setMapzonetype(order.getMapzonetype());
		shop.setMapsheetname(order.getMapsheetname());
		shop.setProductidstring(order.getProductidstring());
		shop.setStripid(order.getStripid());
		shop.setAutoprocessing(order.getAutoprocessing());
		shop.setBandregister(order.getBandregister());
		shop.setCcdbalance(order.getCcdbalance());
		shop.setDemsource(order.getDemsource());
		shop.setGcpsource(order.getGcpsource());
		shop.setCreatetime(new Date());
		return shop;
	}
}
